#include "DeaconsWidget.h"

void DeaconsWidget::loadCitizenship()
{
	citizenship1->setText(QString("%1").arg(m_youth->deacons().citizenship().req1()));
	citizenship2->setText(QString("%1").arg(m_youth->deacons().citizenship().req2()));
	citizenship3->setText(QString("%1").arg(m_youth->deacons().citizenship().req3()));
	citizenship4->setText(QString("%1").arg(m_youth->deacons().citizenship().req4()));
	citizenship5->setText(QString("%1").arg(m_youth->deacons().citizenship().req5()));
	citizenship6->setText(QString("%1").arg(m_youth->deacons().citizenship().req6()));
	citizenship7->setText(QString("%1").arg(m_youth->deacons().citizenship().req7()));
	citizenship8->setText(QString("%1").arg(m_youth->deacons().citizenship().req8()));
	citizenship9->setText(QString("%1").arg(m_youth->deacons().citizenship().req9()));
	citizenship10->setText(QString("%1").arg(m_youth->deacons().citizenship().req10()));
	citizenship11->setText(QString("%1").arg(m_youth->deacons().citizenship().req11()));
	citizenship12->setText(QString("%1").arg(m_youth->deacons().citizenship().req12()));
	citizenship13->setText(QString("%1").arg(m_youth->deacons().citizenship().req13()));
}

void DeaconsWidget::on_citizenship1_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq1(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship2_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq2(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship3_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq3(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship4_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq4(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship5_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq5(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship6_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq6(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship7_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq7(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship8_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq8(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship9_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq9(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship10_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq10(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship11_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq11(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship12_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq12(percent);
	updateCompletions();
}

void DeaconsWidget::on_citizenship13_textChanged(const QString& i_percent)
{
    int percent = i_percent.toInt();
    if (percent > 100) percent = 100;
	m_youth->deacons().citizenship().setReq13(percent);
	updateCompletions();
}

